﻿<template>
  <div>
    <h1>父组件</h1>
    <!-- 子组件的引用，传递 props -->
    <ChildComponent
        :greeting-message="greetingMessage"
        :likes="likesCount"
        :is-published="isPublished"
        :comment-ids="commentIds"
        :author="authorDetails"
    />
  </div>
</template>

<script>
import ChildComponent from './Components/ChildComponent.vue'; // 确保路径正确

export default {
  components: {
    ChildComponent
  },
  data() {
    return {
      greetingMessage: 'Hello from Parent Component',
      likesCount: 42,
      isPublished: true,
      commentIds: [234, 266, 273],
      authorDetails: {
        name: 'Veronica',
        company: 'Veridian Dynamics'
      }
    };
  }
}
</script>
<style>

</style>